package com.leosoft.heatmonitor.control;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class MainController {

	@RequestMapping(value = "/")
	public String base() {
		return "redirect:home/dashBoard";
	}

	@RequestMapping(value = "/home")
	public String homebase() {
		return "redirect:home/dashBoard";
	}

	@RequestMapping(value = "/home/{nav}")
	public ModelAndView home(@PathVariable(value = "nav") String nav) {
		ModelAndView mv = new ModelAndView();
		mv.addObject("nav", nav);
		mv.setViewName("home");
		return mv;
	}

	@RequestMapping(value = "/signin")
	public String signin() {
		return "signin";
	}

}
